import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Sub sub=new Sub(1,1,1);
        sub.Print();

        Base base=new Sub(1,1,1);
        base.Print();

    }


    public static void main1(String[] args) {
        Scanner in=new Scanner(System.in);
        while (in.hasNextInt()){
            int x=in.nextInt();
            int y=in.nextInt();
            int z=in.nextInt();

            Sub sub=new Sub(x,y,z);
            System.out.println(sub.calculate());
        }

        in.close();
    }
}

class Base{
    protected int x;
    protected int y;

    public Base(int x,int y){
        this.x=x;
        this.y=y;
    }

    public int getX(){
        return x;
    }

    public int getY() {
        return y;
    }

    public void Print(){
        System.out.println("父类");
    }
}

class Sub extends Base{
    private final int z;
    public Sub(int x,int y,int z){
        super(x, y);
        this.z=z;
    }

    public int getZ(){
        return z;
    }

    public int calculate(){
        return super.getX()*super.getY()*this.getZ();
    }

    @Override
    public void Print(){
        System.out.println("子类");
    }
}